﻿/*
 * @author: wizardc
 */

using System.IO;
using DouEditor.Utils;
using UnityEngine;

namespace DouEditor.Resource.HotFixed
{
    /// <summary>
    /// 拷贝 AB 包到 StreamingAssets
    /// </summary>
    public class CopyToStreamingAssets
    {
        public void Copy(BuildRule buildRule)
        {
            var streamingAssetsPath = Application.streamingAssetsPath;
            if (Directory.Exists(streamingAssetsPath))
            {
                Directory.Delete(streamingAssetsPath, true);
            }
            EditorUtil.CopyDir(buildRule.copyPath, streamingAssetsPath);
        }
    }
}
